//
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at
 
      http://www.apache.org/licenses/LICENSE-2.0
 
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

.canvas-wrapper
  div.main-canvas(job-plan, plan="plan", jobid="{{jobid}}", set-node="changeNode(nodeid)")

.panel.panel-default(ng-if="node")
  .panel-heading.clearfix
    .panel-title
      | {{ node.description | humanizeText }}

  .panel-body.clean
    .row
     .col-sm-6.col-md-4
       table.table.table-properties(ng-if="node.optimizer_properties.global_properties")
         thead
           tr
             th(colspan="2")
               | Global Data Properties

         tbody
           tr(ng-repeat="property in node.optimizer_properties.global_properties")
             td {{property.name}}
             td(table-property value="property.value")

       table.table.table-properties(ng-if="node.optimizer_properties.local_properties")
         thead
           tr
             th(colspan="2")
               | Local Data Properties

         tbody
           tr(ng-repeat="property in node.optimizer_properties.local_properties")
             td {{property.name}}
             td(table-property value="property.value")
     
       .visible-xs.visible-sm
         table.table.table-properties
           thead
             tr
               th(colspan="2")
                 | Properties
     
           tbody
             tr
               td Operator
               td(table-property value="node.operator_strategy")
     
             tr
               td Parallelism
               td(table-property value="node.parallelism")


     .hidden-sm.col-md-4
       table.table.table-properties
         thead
           tr
             th(colspan="2")
               | Properties

         tbody
           tr
             td Operator
             td(table-property value="node.operator_strategy")

           tr
             td Parallelism
             td(table-property value="node.parallelism")


       table.table.table-properties(ng-if="node.optimizer_properties.estimates")
         thead
           tr
             th(colspan="2")
               | Size Estimates

         tbody
           tr(ng-repeat="property in node.optimizer_properties.estimates")
             td {{property.name}}
             td(table-property value="property.value")

     .col-sm-6.col-md-4
       .visible-xs.visible-sm
         table.table.table-properties(ng-if="node.optimizer_properties.estimates")
           thead
             tr
               th(colspan="2")
                 | Size Estimates
     
           tbody
             tr(ng-repeat="property in node.optimizer_properties.estimates")
               td {{property.name}}
               td(table-property value="property.value")
     
       table.table.table-properties(ng-if="node.optimizer_properties.costs")
         thead
           tr
             th(colspan="2")
               | Cost Estimates
     
         tbody
           tr(ng-repeat="property in node.optimizer_properties.costs")
             td {{property.name}}
             td(table-property value="property.value")
